<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    //正则表达式
    let str = '白日依山尽，黄河入海流';
    //匹配黄河
    const reg = /黄河/;
    //进行匹配我们的字符串
    console.log(reg.test(str))
    //进行检测我们的字符串
    console.log(reg.exec(str))

    let str1 = /[a-z]/;
    var a = 'a'
    console.log(str1.test(a))
</script>
</body>
</html>